﻿<?php

include("db_connection.php"); //db접속파일
global $connect;
$sql = "select * from net_eng";
$rs = mysql_query($sql,$connect);

while($result = mysql_fetch_array($rs)){
    $seq = $result[seq];
    $english_text = $result[english_text];
    $korean_text = $result[korean_text];
    $finish = $result[finish];

    $xmlList.="<net_eng><seq>$seq</seq><english_text>$english_text</english_text><korean_text>$korean_text</korean_text><finish>$finish</finish></net_eng>";
}
mysql_free_result($rs);
$fp = fopen("net_eng_xml.xml","w");
$xmlDoc="<?xml version='1.0' encoding='euc-kr'?><root>$xmlList</root>";
fputs($fp, $xmlDoc);
fclose($fp);

?>
